//
//  ReadBookVOrH_VC.h
//  KidReading
//
//  Created by telen on 14/12/23.
//  Copyright (c) 2014年 刘赞黄Telen. All rights reserved.
//

#import "BaseViewController.h"

#import "ReadView.h"
#import "TLSoundPlayer.h"
#import "NetDownloadBooks.h"
#import "WordsDictData.h"
#import "StatusButtonView.h"
#import "FloatBtnView.h"
//#import "WordsView.h"
#import "TransView.h"
#import "TLMutexUIViewDelegate.h"
#import "PageMapView.h"
#import "HangMenuForCover.h"
//#import "DBHelper.h"
@class ReadWindow;

extern NSString* const ReadSource_JR;
extern NSString* const ReadSource_Pep;

#define ReadLocalizedString(str) NSLocalizedStringFromTable(str, @"ReadVCLocalizable", @"")

@class TABLE_TALK_LIST,WordsView,StoryCardInBookModel;

@interface ReadBookVOrH_VC : BaseViewController<ReadViewDelegate,TLSoundPlayerDelegate,NetDownloadBooksNotice,WordsDictDataDelegate,StatusButton_2_ViewDelegate,StatusButton_3_ViewDelegate,TransViewDelegate,PageMapViewDelegate>
{
    NSArray* pageDisArr;//页码描述
    NSDictionary* pageId_index_dict;//pageId与pageindex关系
    NSInteger pageContentCount;//内容页总算
    //
    UIView* topBarView;//隐藏的工具条
    UIButton* topMenuBtn; //右侧，返回目录或者封面按钮
    int  menuIndex;
    UILabel* pageNumberLabel;
    //
    TLMutexUIViewDelegate* mutex;
    ReadView* readView;
    PageMapView* pageMapView;
    //
    NSTimer* timer;
    volatile NSTimeInterval longx;
    //
    NSArray* mp3Arr;
    NSInteger indexMp3;
    //
    CGFloat topBarHeight;
    //
    UIImageView* handImageView;
    //浮动区域
    CGRect floatframe_topBar;
    CGRect floatframe_full;
    //
    NSString* eva_model;
    NSString* eva_txt;
    //翻页手势
    UISwipeGestureRecognizer* nextSwipe;
    UISwipeGestureRecognizer* preSwipe;
}

@property(nonatomic,strong)NSArray* pagesArr;//包含封面所有
@property(nonatomic,strong)TABLE_BOOKS* tb_book;
@property(nonatomic,strong)NSString* bookName;
@property(nonatomic,assign)NSInteger bookid;
@property(nonatomic,assign)NSInteger bookOid;
@property(nonatomic,assign)NSInteger pageNums;
@property(nonatomic,strong)NSString* coverImageUrl;
@property(nonatomic,strong)UIImage* coverImg;
@property(nonatomic,strong)NSDictionary* showInfoDict;
@property(nonatomic,strong)NSDictionary* bookDict;
@property(nonatomic,strong)NSDictionary* evaluateDict;
@property(nonatomic,strong)StoryCardInBookModel* storyCardInBook;
@property(nonatomic,assign)BOOL isAutoRead;
@property(nonatomic,assign)BOOL isAutoRead_ForRec;//录音自动播放
@property(nonatomic,assign)BOOL needPageMap;
@property(nonatomic,assign)NSInteger currentIndex;
@property(nonatomic,strong)NSString* quizUrl ;//__deprecated_msg("废自 JR 2.0.1");
@property(nonatomic,strong)TABLE_TALK_LIST* talkInfo;
@property(nonatomic,assign)BOOL isFavorited; //是否收藏状态
@property(nonatomic,assign)NSInteger hurdleNo;
@property(nonatomic,assign)NSInteger activityId;
//
@property(nonatomic,strong)NSDictionary* operMap;
@property(nonatomic,strong)NSDictionary* readerInsideOperMap;
//
@property(nonatomic,assign)long long quizEdition ;//__deprecated_msg("废自 JR 2.0.1");
//
@property(nonatomic,assign)CGFloat bookRatioWH;
@property(nonatomic,strong)NSString* readSource;
//
@property(nonatomic,assign)BOOL isCatched;
@property(nonatomic,assign)BOOL activityImageDCom;
//
@property(nonatomic,strong)ReadWindow *popWindow;

//forSDK special
@property(nonatomic,assign) NSInteger totalPage;


+(instancetype)currentReadInstance;

- (void)gotToPageIndex:(NSUInteger)pageindex;

- (void)dismissPopWindow;
@end
